package cn.u313.repository;

import cn.u313.entry.BlessingEntry;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface BlessingEntryRepository extends JpaRepository<BlessingEntry, Integer>, JpaSpecificationExecutor<BlessingEntry> {
        @Query(nativeQuery = true,value = "SELECT\n" +
                " * "+
                "FROM\n" +
                "t_blessing_2023\n" +
                "where qq=:qq ")
        BlessingEntry byQq(String qq);
//    @Query(nativeQuery = true,value = "SELECT * FROM `t_yjilu` where id = '89152' ")
//    JiLuEntry byQQ(String s);
//    @Query(nativeQuery = true,value = "select count(1) from t_yjilu where to_days(time) = to_days(now()) and qq0 = :qq and type=:type ")
//    int countByqqAndType(String qq,String type);
//    @Query(nativeQuery = true,value = "select count(1) from t_yjilu where to_days(time) = to_days(now()) and qq0 = :qq and qq1 =:qq1")
//    int countQqToQq1(String qq,String qq1);
//
//    /**
//     * 通过用户与奖励类型获取今天是否兑换
//     * @param qq
//     * @param type
//     * @return
//     */
//    @Query(nativeQuery = true,value = "select count(1) from t_yjilu where to_days(time) = to_days(now()) and qq0 = :qq and type like :type ")
//    int countByqqAndTypeLike(String qq, String type);
////    public

}